package com.xuecheng.learning.domain.consumer;

import com.sun.org.apache.regexp.internal.RE;
import com.xuecheng.base.mq.OrderTransDto;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

import static com.xuecheng.base.mq.MqConstant.*;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-09-16  09:32
 */
@Component
public class OrderConsumer {

    @RabbitListener(bindings = @QueueBinding(
        value = @Queue(name = MQ_QUEUE, durable = "true"),
        exchange = @Exchange(name = MQ_EXCHANGE, type = ExchangeTypes.TOPIC),
        key = {MQ_ORDER_KEY}
    ))
    public void listenOrderMsg(OrderTransDto orderTransDto){
        // 保存选课


    }


}
